<?php
    class Cart extends MY_Controller
    {
        public function __construct()
        {
            parent::__construct();
            $this->load->model('admin/cart_model');
            $this->load->model('admin/status_cart_model');
        }
        public function index()
        {
            $data=$this->cart_model->getAll(10,0,-1);
            $status_cart=$this->status_cart_model->getAll(1000,0);
            $this->load->vars('item',$data);
            $this->load->vars('status',$status_cart);
        }
        public function detail()
        {
           $id=$this->uri->segment(4);
           $items=$this->cart_model->getCartById($id); 
           $this->load->vars('item',$items);
        }
    }
?>